package com.gxsf.wechatbook.repo;

import com.gxsf.wechatbook.pojo.TokenList;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author BeijiRonin
 * @version 1.0.0
 * @date 2021/1/18 18:04
 */
public interface TokenListRepository extends JpaRepository<TokenList, Long> {
    List<TokenList> findAllByStatus(long status);

    List<TokenList> findAllByTokenNameAndStatusOrderByTokenIdDesc(String tokenName, long status);
    TokenList findFirst1ByTokenNameAndStatusOrderByTokenIdDesc(String tokenName, long status);
    void deleteByTokenName(String tokenName);
}
